package com.objectcarpentry.kaylee.ui.controls;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Scale;
import org.eclipse.ui.menus.WorkbenchWindowControlContribution;

public class VolumeControlContribution extends
		WorkbenchWindowControlContribution {

	private Scale scale;
	
	public VolumeControlContribution() {}
	
	public VolumeControlContribution(String id) {
		super(id);
	}

	@Override
	protected Control createControl(Composite parent) {
//		scale = new Scale(parent, SWT.HORIZONTAL);
//		scale.setMinimum(0);
//		scale.setMaximum(100);
//		scale.setSelection(50);
//		
//		
//		scale.addSelectionListener(new SelectionAdapter(){
//			
//			@Override
//			public void widgetSelected(SelectionEvent e){
//				double d = ((double)scale.getSelection() / 100);
//				KayleeGStreamerPlugin.getDefault().getPlayer().setVolume(d);
//			}
//
//			
//		});
//		return scale;
		
		SlickVolumeControl svc = new SlickVolumeControl(parent);
		return svc.getControl();
		
		
		
	}

	public int computeWidth(Control c) {
		return 100;
	}
}
